package cn.zhaoyuening.hadoopdemo.rpc;

import cn.zhaoyuening.hadoopdemo.utils.ConfigureFactory;
import org.apache.commons.configuration.ConfigurationFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;
import java.net.InetSocketAddress;

public class RpcClient {
    public static void main(String[] args) throws IOException {
        LoginService proxy = RPC.getProxy(LoginService.class, 1L, new InetSocketAddress("localhost", 8088), ConfigureFactory.getConfiguration());
        String zhao = proxy.login("zhao", "124");
        System.out.println(zhao);
    }
}
